#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>

int my_atoi(const char* p)
{
	const char* k = p;
	int g = 1;
	int count = 0;
	while (*k == ' ')
	{
		k++;
	}
	{
		if (*k == '+')
		{
			g = 1;
			k++;
		}
		if (*k == '-')
		{
			g = -1;
			k++;
		}
		long long ret = 0;
		while (*k >= '0' && *k <= '9')
		{
			ret = ret * 10 + (*k - '0');
			k++;
		}
		return (int)(ret * g);
	}
}
int main()
{
	//int re = atoi("-ds323")
	char ak[] = " - 326223vbhsvbhs";
	char a = " - 326223vbhsvbhs";
	int ret = my_atoi("  -326223vbhsvbhs");
	int re = atoi("  -326223vbhsvbhs");
	printf("%d\n", ret);
	printf("%d\n", re);
	return 0;
}